package animalParadise;

/*
 * 鸭子类（子类）
 */

public class Duck extends Animal implements Terrestrial {
	
	private int legNum;
	
	public Duck(){
		
	}
	
	public Duck(String name, int legNum){
		super(name);
		this.legNum = legNum;
	}
	
	public void setLegNum(int legNum) {
		this.legNum = legNum;
	}

	@Override
	// 获得鸭子腿的条数
	public int getLegNum() {
		return legNum;
	}

	@Override
	// 鸭子叫
	public String shout() {
		return "嘎嘎嘎";
	}
}
